home *** CD-ROM | disk | FTP | other *** search
/ Elite European Models 1 / Elite European Models 1.iso / pc / elite.dxr / 00014.ls < prev    next >
Encoding:
Text File  |  1996-05-06  |  1.5 KB  |  30 lines

  1. global gPictSprite, gCenterH, gCenterV
  2.  
  3. on exitFrame
  4.   if the stretch of sprite gPictSprite = 0 then
  5.     set userH to the mouseH
  6.     set userV to the mouseV
  7.     set spriteWidth to the width of cast the castNum of sprite gPictSprite / 2
  8.     set spriteHeight to the height of cast the castNum of sprite gPictSprite / 2
  9.     set distance to 20
  10.     set PICThModifier to ((userH < 20) - ((userH > 620) and (userV < the top of sprite 3))) * distance
  11.     set PICTvModifier to ((userV < 20) - ((userV > (the top of sprite 3 - 21)) and (userV < the top of sprite 3))) * distance
  12.     set newH to checkRange(the locH of sprite gPictSprite + PICThModifier, 640 - spriteWidth, spriteWidth)
  13.     set newV to checkRange(the locV of sprite gPictSprite + PICTvModifier, the top of sprite 3 - spriteHeight, spriteHeight)
  14.     set the locV of sprite gPictSprite to newV
  15.     set the locH of sprite gPictSprite to newH
  16.     updateStage()
  17.     set PICThModifier to PICThModifier / distance * 10
  18.     set PICTvModifier to PICTvModifier / distance * 10
  19.     set newCursor to "Cursor " & PICThModifier & "," & PICTvModifier
  20.     set the cursor of sprite gPictSprite to [the number of member newCursor, the number of member (newCursor & " Mask")]
  21.     puppetSprite(gPictSprite, 1)
  22.     go(the frame)
  23.     puppetSprite(gPictSprite, 0)
  24.   else
  25.     set the cursor of sprite gPictSprite to [the number of member "Cursor 1,1", the number of member "Cursor 1,1 Mask"]
  26.     go(the frame)
  27.   end if
  28.   set the cursor of sprite 3 to -1
  29. end
  30.